﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class my_ascx_photos : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        int userno = int.Parse(Request["no"]);
        int cno = int.Parse(Request["cno"]);

        ctpDataContext db = new ctpDataContext();

        var data = from p in db.ct_s_pics
                   where p.create_user_no == userno && p.ct_no==cno
                   select new
                   {
                       tourl="../../city_s_show_picture.aspx?no="+p.no.ToString(),
                       filename="../../city_imgs/1/"+p.filename.Trim()
                   };

        this.DataList1.DataSource = data.Take(9);
        this.DataBind();

       // this.HyperLink1.NavigateUrl = "~/my/add_photo.aspx?no=" + userno + "&cno=" + cno; ;

        this.HyperLink2.NavigateUrl = "../more_photo.aspx?no=" + userno + "&cno=" + cno;
    }
}
